<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //  对比值   ==
        switch (2) {
            case 1:
                alert("我是1");
                break;
            case 2:
                alert("我是2");
                break;
            case 3:
                alert("我是3");
                break;    
            default:
                alert("我是其他的数字");
                break;
        }
    </script>
</head>
<body>
    
</body>
</html>